package com.aaa.service.impl;

import com.aaa.dao.UserMapper;
import com.aaa.entity.User;
import com.aaa.service.UserServiceDao;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;


@Service
public class UserServiceImpl extends ServiceImpl<UserMapper,User> implements UserServiceDao {
    @Resource
    UserMapper userMapper;

    @Override
    public Map<String,Object> finduser(Integer uid) {
        return userMapper.finduser(uid);
    }

    @Override
    public Integer updateuser(User user) {
        return userMapper.updateuser(user);
    }

    @Override
    public Integer updpass(String password,Integer id) {
        return userMapper.updpass(password,id);
    }

    @Override
    public List<User> find(Integer pageSize, Integer pageNum) {
        return userMapper.find(pageSize, pageNum);
    }

    @Override
    public Integer findcount() {
        return userMapper.findcount();
    }

    @Override
    public int add(User user) {
        return userMapper.add(user);
    }

    @Override
    public int delete(Integer uid) {
        return userMapper.delete(uid);
    }

    @Override
    public int update(User user) {
        return userMapper.update(user);
    }

    @Override
    public List<User> finduser() {
        return userMapper.selectList(null);
    }

    @Override
    public List<User> findauditor() {
        return userMapper.selectList(null);
    }

}
